<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/view/include/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>个人任务</title>
</head>
<body>
	<!-- BEGIN CONTENT -->
	<div class="">
		<!-- BEGIN CONTENT BODY -->
		<div class="page-content" style="height: 700px;">
			<!-- BEGIN PAGE HEADER-->
			<!-- BEGIN THEME PANEL -->
			<!-- END THEME PANEL -->
			<!-- BEGIN PAGE BAR -->
			<div class="portlet-title tabbable-line">
				<div class="caption caption-md">
					<i class="icon-globe theme-font hide"></i> <span
						class="caption-subject font-blue-madison bold uppercase">账户管理</span>
				</div>
				<ul class="nav nav-tabs">
					<li class="active"><a href="#tab_1_1" data-toggle="tab">待办任务</a>
					</li>
					<li><a href="#tab_1_2" data-toggle="tab">已办任务</a></li>
					<li><a href="#tab_1_3" data-toggle="tab">申请任务</a></li>
				</ul>
			</div>
			<div class="portlet-body">
				<div class="tab-content">
					<!-- PERSONAL INFO TAB -->
					<div class="tab-pane active" id="tab_1_1">
						<!-- BEGIN EXAMPLE TABLE PORTLET-->
						<div class="portlet box green">
							<div class="portlet-title">
								<div class="caption">
									<i class="fa fa-cogs"></i>待办任务
								</div>
								<div class="tools">
									<a href="javascript:;" class="collapse" data-original-title=""
										title=""> </a> <a href="#portlet-config" data-toggle="modal"
										class="config" data-original-title="" title=""> </a> <a
										href="javascript:;" class="reload" data-original-title=""
										title=""> </a> <a href="javascript:;" class="remove"
										data-original-title="" title=""> </a>
								</div>
							</div>

							<div class="portlet-body">
								<div class="table-toolbar">
									<div class="row">
										<div class="col-md-6">
											<div class="btn-group"></div>
										</div>
										<div class="col-md-6"></div>
									</div>
								</div>
								<table class="table table-striped table-hover table-bordered"
									id="sample_editable_1">
									<thead>
										<tr>
											<th>假种</th>
											<th>申请人</th>
											<th>申请时间</th>
											<th>开始时间</th>
											<th>结束时间</th>
											<th>当前节点</th>
											<th>任务创建时间</th>
											<th>流程状态</th>
											<th>待办类型</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody>

										<c:forEach items="${page.result }" var="leave">
											<c:set var="task" value="${leave.task }" />
											<c:set var="pi" value="${leave.processInstance }" />
											<tr id="${leave.id }" tid="${task.id }">
												<td>${leave.leaveType }</td>
												<td>${leave.userId }</td>
												<td>${leave.applyTime }</td>
												<td>${leave.startTime }</td>
												<td>${leave.endTime }</td>
												<td><a class="trace" href='#' pid="${pi.id }"
													pdid="${pi.processDefinitionId}" title="点击查看流程图">${task.name }</a>
												</td>
												<%--<td><a target="_blank" href='${ctx }/workflow/resource/process-instance?pid=${pi.id }&type=xml'>${task.name }</a></td> --%>
												<td>${task.createTime }</td>
												<td>${pi.suspended ? "已挂起" : "正常" }；<b title='流程版本号'>V:
														${leave.processDefinition.version }</b></td>
												<td><c:if test="${empty task.assignee }">
														<a class="claim"
															href="${ctx }/oa/leave/task/claim/${task.id}">签收</a>
													</c:if> <c:if test="${not empty task.assignee }">
														<%-- 此处用tkey记录当前节点的名称 --%>
														<a class="handle" tkey='${task.taskDefinitionKey }'
															tname='${task.name }' href="#">办理</a>
														<a href="${ctx }/act/task/complete/${act.id}">完成</a>
														<a href="${ctx }/act/task/rollBack/${act.id}">驳回</a>
														<%-- 此处用tkey记录当前节点的名称 --%>
														<a class="handle" tkey='${task.taskDefinitionKey }'
															tname='${task.name }' href="#">办理</a>
														<a
															href="${ctx }/act/task/rollBackByTaskKey/${act.id}/${userTaskKey}">回退到usertask1</a>
														<a href="${ctx }/act/task/delegateTask/${act.id}/hp003">委派hp003</a>
													</c:if></td>
											</tr>
										</c:forEach>
									</tbody>
								</table>
							</div>
						</div>
						<!-- END EXAMPLE TABLE PORTLET-->
					</div>
					<div class="tab-pane active" id="tab_1_2">
						<!-- BEGIN EXAMPLE TABLE PORTLET-->
						<div class="portlet box green">
							<div class="portlet-title">
								<div class="caption">
									<i class="fa fa-cogs"></i>已办任务
								</div>
								<div class="tools">
									<a href="javascript:;" class="collapse" data-original-title=""
										title=""> </a> <a href="#portlet-config" data-toggle="modal"
										class="config" data-original-title="" title=""> </a> <a
										href="javascript:;" class="reload" data-original-title=""
										title=""> </a> <a href="javascript:;" class="remove"
										data-original-title="" title=""> </a>
								</div>
							</div>

							<div class="portlet-body">
								<div class="table-toolbar">
									<div class="row">
										<div class="col-md-6">
											<div class="btn-group"></div>
										</div>
										<div class="col-md-6"></div>
									</div>
								</div>
								<table class="table table-striped table-hover table-bordered"
									id="sample_editable_1">
									<thead>
										<tr>
											<th>申请人</th>
											<th>指定办理人</th>
											<th>任务名称</th>
											<th>流程实例ID</th>
											<th>流程DefID</th>
											<th>任务创建时间</th>
											<th>任务过期时间</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody>

										<c:forEach items="${doneList}" var="doneAct">
											<tr>
												<td></td>
												<td>${doneAct.assignee}</td>
												<td>${doneAct.name }</td>
												<td>${doneAct.processInstanceId}</td>
												<td>${doneAct.processDefinitionId}</td>
												<td>${doneAct.createTime}</td>
												<td>${doneAct.dueDate}</td>
												<td><a href="">详情</a></td>
											</tr>
										</c:forEach>
									</tbody>
								</table>
							</div>
						</div>
						<!-- END EXAMPLE TABLE PORTLET-->
						<!-- END EXAMPLE TABLE PORTLET-->
					</div>
					<div class="tab-pane active" id="tab_1_3">3</div>
				</div>
			</div>
			<!-- END CONTENT BODY -->
		</div>
		<!-- END CONTENT -->



		<!-- BEGIN CORE PLUGINS -->
		<!--[if lt IE 9]>
<script src="../../assets/global/plugins/respond.min.js"></script>
<script src="../../assets/global/plugins/excanvas.min.js"></script> 
<![endif]-->
		<script src="${ctxStatic}/assets/global/plugins/jquery.min.js"
			type="text/javascript"></script>
		<script src="${ctxStatic}/assets/global/plugins/jquery-migrate.min.js"
			type="text/javascript"></script>
		<!-- IMPORTANT! Load jquery-ui.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
		<script
			src="${ctxStatic}/assets/global/plugins/jquery-ui/jquery-ui.min.js"
			type="text/javascript"></script>
		<script
			src="${ctxStatic}/assets/global/plugins/bootstrap/js/bootstrap.min.js"
			type="text/javascript"></script>
		<script
			src="${ctxStatic}/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js"
			type="text/javascript"></script>
		<script
			src="${ctxStatic}/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js"
			type="text/javascript"></script>
		<script src="${ctxStatic}/assets/global/plugins/jquery.blockui.min.js"
			type="text/javascript"></script>
		<script src="${ctxStatic}/assets/global/plugins/jquery.cokie.min.js"
			type="text/javascript"></script>
		<script
			src="${ctxStatic}/assets/global/plugins/uniform/jquery.uniform.min.js"
			type="text/javascript"></script>
		<script
			src="${ctxStatic}/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js"
			type="text/javascript"></script>
		<script src="${ctxStatic}/assets/global/scripts/datatable.js"
			type="text/javascript"></script>
		<script
			src="${ctxStatic}/assets/global/plugins/datatables/datatables.min.js"
			type="text/javascript"></script>
		<script
			src="${ctxStatic}/assets/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.js"
			type="text/javascript"></script>
		<script
			src="${ctxStatic}/assets/admin/pages/scripts/table-datatables-editable.min.js"
			type="text/javascript"></script>
		<!-- END CORE PLUGINS -->
		<!-- BEGIN PAGE LEVEL PLUGINS -->
		<script
			src="${ctxStatic}/assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.js"
			type="text/javascript"></script>
		<!-- END PAGE LEVEL PLUGINS -->

		<!-- BEGIN PAGE LEVEL SCRIPTS -->

		<!-- END PAGE LEVEL SCRIPTS -->
</body>
</html>